using System;
using System.IO;
using SpecMaker.Core.Interfaces;

namespace SpecMaker.Core
{
    public class FileWriter : IIOWriter
    {
        private StreamWriter stream;

        public void WriteLine(string s)
        {
            stream.WriteLine(s);
        }

        public void Open(string filename)
        {
            stream = new StreamWriter(File.Create(filename));
        }

        public void Close()
        {
            stream.Flush();
            stream.Close();
        }
    }
}